<!--
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2023-08-14 13:32:34
 * @LastEditors: liuxinjia 15201611813@163.com
 * @LastEditTime: 2023-08-16 11:03:38
 * @FilePath: \MashangqianWebByBank\src\components\summaryTableTotal.vue
 * @Description:表格底部金额统计组件
-->
<template>
  <div class="summaryContainer" style="">
    <el-table  :data="summaryTotalData" :show-header="false" style="width: 100%">
      <el-table-column
        v-for="(item, index) in tableColumnData"
        :key="index"
        :prop="item.prop"
        :label="item.label"
      >
        <template slot-scope="scope">
          <el-tag v-if="item.prop === 'summaryTotalText'" type="success" style="font-weight:bold;font-size:17px">总计</el-tag>
          <el-tag v-if="item.prop==='fangkuanMoney'" type="success" style="font-weight:bold;font-size:17px">{{ toThousands(scope.row.fangkuanMoney) }}</el-tag>
          <el-tag  v-if="item.prop==='shehuoMoney'" type="success" style="font-weight:bold;font-size:17px">{{ toThousands(scope.row.shehuoMoney) }}</el-tag>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
// 引入金额格式化函数
import { toThousands } from "@/utils/Tools";
export default {
  name: "Pagination",
  props: {
    // 表格统计的数据
    summaryTotalData: {
      type: Array,
      default() {
        return [];
      },
    },
    tableColumnData: {
      type: Array,
    },
  },
  data() {
    return {
      // 金额格式化
      toThousands,
    };
  },
  computed: {},
  methods: {
  },
};
</script>

<style scoped>
.pagination-container {
  background: #fff;
  padding: 10px 16px;
}

.pagination-container.hidden {
  display: none;
}
</style>
